package com.southminority.ethnic.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户令牌表
 * @TableName user_token
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="user_token")
@Data
public class UserToken extends BasePoJo implements Serializable {
    /**
     * 令牌ID
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "令牌ID")
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 令牌内容
     */
    @TableField("token")
    private String token;

    /**
     * 登录IP地址
     */
    @TableField("ip_address")
    private String ipAddress;

    /**
     * 过期时间
     */
    @TableField("expiry_time")
    private Date expiryTime;

}
